﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ProtoGame.GameLib.Entities
{
    public class BasicSprite : GraphicEntity
    {
        Texture2D spriteGfx;

        //protected byte State { get; set; }
        
        //public Vector2 Velocity { get; set; }

        public BasicSprite(Texture2D spriteGfx)
        {
            this.spriteGfx = spriteGfx;

            /*State = 0;
            Velocity = Vector2.Zero;*/
        }

        public override Rectangle Bounds
        {
            get
            {
                return new Rectangle((int)Position.X, (int)Position.Y, (int)(spriteGfx.Width * Scale.X), (int)(spriteGfx.Height * Scale.Y));
            }
        }

        /*protected void UndoMovement()
        {
            Position -= Velocity;
        }*/

        //public override void Update(GameTime gameTime) { }

        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(spriteGfx, Position, null, ColorEffects, Rotation, Origin, Scale, Flip, LayerDepth);
        }

        public override void DoCollision(byte collisionType)
        {
            // Sprite não tem colisão com nada
        }
    }
}
